package com.zfzs.post.modules.agent.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @author ck
* @date 2019-09-05
*/
@Entity
@Data
@Table(name="agent_verified")
public class AgentVerified implements Serializable {

    // 主键
    @Id
    @Column(name = "id")
    private Long id;

    // 身份证姓名
    @Column(name = "card_name")
    private String cardName;

    // 身份证卡号
    @Column(name = "card_no")
    private String cardNo;

    // 身份证正面
    @Column(name = "card_posit_img_id")
    private Long cardPositImgId;

    // 身份证反面
    @Column(name = "card_back_img_id")
    private Long cardBackImgId;

    // 创建日期
    @Column(name = "create_time")
    private Timestamp createTime;

    // 修改时间
    @Column(name = "update_time")
    private Timestamp updateTime;

    public void copy(AgentVerified source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}